Skip to main content

All Questions

Tagged with
4votes
3answers
803views

FIFO array/queue

I'm new to programming and was tasked with programming a generic circular FIFO queue, without using anything but an underlying array and self-programmed methods. I still don't know how to approach ...
deutschistschwer's user avatar
5votes
2answers
2kviews

User input happy birthday program

For self-study homework I made a Java program that takes user input, creates people as objects, and says "Happy Birthday" to each person. I am just wondering what mistakes I made here or how it could ...
Steven Halverson's user avatar
5votes
1answer
3kviews

Counting the number of unique fractions read from a text file

I will begin this question with the disclaimer that it is homework but my code is written and working, I just want to know if there any ways in which I can improve what I already have. I want my ...
M Nico's user avatar
1vote
1answer
874views

Integer sum program

This is a little assignment I am working on. I am a beginner Java programmer and would love some advice on how to improve this code. For more context, here are the assignment details: Create a ...
jzbakos's user avatar
6votes
3answers
912views

Loading tab-separated tweet data into an array

I'm working on this school project and was wondering if there was any way of storing this information better, faster, more professionally. I'm also restricted to only using an array; don't ask me we ...
user avatar
4votes
1answer
1kviews

Displaying a randomly sized array as a table

This program creates an integer array with a random size of 5-50 elements (inclusive). It then fills the array with random numbers between 0 - 100 (inclusive). The interesting part comes when I then ...
BrainFRZ's user avatar
3votes
3answers
2kviews

State flowers and birds

This runs as is, but I'm looking for an alternative way to write it. ...
danelle hankins's user avatar
6votes
2answers
1kviews

2D array to draw a letter 'F'

This is my code to print letter 'F' with nested loop 2d array. Are there changes that could be made in it to make it look better or more efficient? ...
Syed Furqan Ali's user avatar
3votes
4answers
2kviews

Concatenate two arrays generated randomly

I have written the code to concatenate two arrays . Please let me know of any loopholes in the written code. ...
RS_ingo's user avatar
8votes
2answers
3kviews

Finding the longest Collatz sequence cycle

I wrote a program to calculate Collatz sequences for initial numbers between 1 and a given integer i, then find the one with the largest cycle length. My code is ...
dan's user avatar
  • 81
4votes
3answers
2kviews

Sorting strings in a one dimensional array

What are the better solutions possible? I have a character array with different strings. There is a max size for the strings. In case a string is smaller than max size remaining places are filled ...
varsh's user avatar
5votes
1answer
4kviews

How is my quarterly sales statistics program?

Am I making good use of a 2-D array? Is this code inefficient? I am supposed to receive input from 6 departments for 4 quarterly periods in Java. My assignment asks: Quarterly Sales Statistics ...
eruano57's user avatar
6votes
5answers
64kviews

Book program with arrayList

I have this Book program that contains 2 classes: Book and Library. I have the Book class done, but need some help on the ...
Bopeng Liu's user avatar
2votes
1answer
218views

High School Java Class: Pong Project External Reviewer

It would be a huge help if you could tell me ways to make my code run smoother and if I could add more code to my program to make my program more unique. Panelball class: ...
user2260077's user avatar
5votes
3answers
1kviews

Printing a 2D array

The problem presented to me: Declare a two-dimensional array of ints in main. Write a method to read in the size of each dimension, allocate memory for the array and return it (DON'T DO THIS IN MAIN,...
Khoa Vo's user avatar

153050per page
close